Get Template
Get Template Details
An API is exposed using which the business/IT system can fetch the WA template information for their respective account. The WA template details includes- information with respect to Header, Body, Footer, Component Details, Name, Language, Status and Template category.
Authorization Mechanism - Token based authentication mechanism will be used for authorizing user to fetch the template details. Please check 'Getting Started - Before You Start' section for details.
Fetch template API Details
- API endpoint: https://api.aclwhatsapp.com/access-api/v1/wa/{WABA-ID}/message_templates/:name
- Request Type: GET
Sample curl Request
curl --location '
https://api.aclwhatsapp.com/access-api/v1/wa/{WABA-ID}/message_templates/:name?limit=1'
\
--header 'Authorization: Bearer <access_token>'
Sample Response
Payload
{
"data": [
{
"name": "cus_mar_text_30_aug_2024234",
"parameter_format": "POSITIONAL",
"components": [
{
"type": "BODY",
"text": "Hi {{1}},\n\nThis is a test message for testing {{2}}.\n\nThanks",
"example": {
"body_text": [
[
"test1",
"ywsy"
]
]
}
},
{
"type": "FOOTER",
"text": "Test Footer Text"
},
{
"type": "BUTTONS",
"buttons": [
{
"type": "QUICK_REPLY",
"text": "Test7263"
}
]
}
],
"language": "en",
"status": "APPROVED",
"category": "MARKETING",
"id": "1564511804193504"
}
],
"paging": {
"cursors": {
"before": "MAZDZD",
"after": "MAZDZD"
}
}
},
Fetch Bulk template API Details
- API endpoint: 'https://api.aclwhatsapp.com/access-api/v1/wa/{WABA-ID}/message_templates'
- Request Type: GET
Sample curl Request
curl --location '
https://api.aclwhatsapp.com/access-api/v1/wa/{WABA-ID}/message_templates?fields=name%2Ccategory'
\
--header 'Authorization: Bearer <access_token>'
Header Values
Attribute | Description |
---|---|
Authorization | Bearer token. |
Content-type | Fixed value- application/json. |
Sample Response
Payload
{
"data": [
{
"name": "cus_mar_text_30_aug_2024234",
"category": "MARKETING",
"id": "1564511804193504"
},
{
"name": "car_img_ctavwdyn_ctacpn_10cards_1",
"category": "MARKETING",
"id": "1333309830982126"
},
{
"name": "car_vid_ctavwdyn_qr_btn_ctabtn_2cards",
"category": "MARKETING",
"id": "4860322817525345"
},
{
"name": "feedback_variant_btn_3",
"category": "MARKETING",
"id": "1032405941917040"
},
{
"name": "test_msg",
"category": "MARKETING",
"id": "1421604655213345"
},
{
"name": "car_vid_ctavwstat_ctacpn_10cards",
"category": "MARKETING",
"id": "1062261508467296"
},
{
"name": "video_carousel_2024",
"category": "MARKETING",
"id": "1018450829968192"
},
{
"name": "demo_test_cta4buttons",
"category": "MARKETING",
"id": "1551908772105356"
},
{
"name": "dynamic_test2024",
"category": "MARKETING",
"id": "1266183881089089"
},
{
"name": "dynamic_cta",
"category": "MARKETING",
"id": "1872641546479500"
},
{
"name": "dynamic_test_2024",
"category": "MARKETING",
"id": "1104434974587737"
},
{
"name": "custom_temp24",
"category": "MARKETING",
"id": "1311601536914639"
},
{
"name": "demo_auth_207",
"category": "AUTHENTICATION",
"id": "1880620412458184"
},
{
"name": "demo_text_10_oct_24",
"category": "MARKETING",
"id": "8434800873278619"
},
{
"name": "location_var_test24june",
"category": "MARKETING",
"id": "958952125962296"
},
{
"name": "car_img_ctavwdyn_ctacpn_10cards",
"category": "MARKETING",
"id": "499792516219326"
},
{
"name": "test_template_video",
"category": "MARKETING",
"id": "904443601095881"
},
{
"name": "99acres",
"category": "MARKETING",
"id": "1204129307440429"
},
{
"name": "4cards",
"category": "MARKETING",
"id": "1148714916230272"
},
{
"name": "check_cloud_carousel",
"category": "MARKETING",
"id": "561965259582090"
},
{
"name": "carousel2024",
"category": "MARKETING",
"id": "984471233722429"
},
{
"name": "video_template_text2024_6_18_16_0_17",
"category": "MARKETING",
"id": "449371651377493"
},
{
"name": "text_template2024_6_25_12_50_37",
"category": "MARKETING",
"id": "1231944031548016"
},
{
"name": "dynamic_cta_media_01",
"category": "MARKETING",
"id": "537913535301257"
},
{
"name": "video_template_text2024_6_18_14_0_5",
"category": "MARKETING",
"id": "803122508458410"
}
],
"paging": {
"cursors": {
"before": "MAZDZD",
"after": "MjQZD"
},
"next": "https://api.aclwhatsapp.com/access-api/v1/wa/{WABA-ID}/message_templates?after=MjQZD&fields=name,category"
}
}